package com.iflytek.sbd.demo.lambda;

/**
 * @program: sbd
 * @description:
 * @author: 陈英俊
 * @create: 2021-12-28 15:01
 */
public class ListLambdaTest {

//
//    public static void main(String[] args) {
//
//        ArrayList<Student> list = new ArrayList<>();
//        for (int i = 1; i <= 10; i++) {
//            Student student = new Student();
//            student.setName(i+"");
//            student.setAge(i);
//            list.add(student);
//        }
//        Student student = list.stream().max(Comparator.comparing(Student::getAge)).get();
//        Student student = list.stream().max(Comparator.comparing(Student::getName)).orElse(new Student());
//
//        System.out.println(student);
//    }
}
